Keep Alive Management

ABSTRACT

Keep alive management techniques are described. In one or more implementations, a keep alive interval is calculated by an operating system of the computing device. The keep alive interval is used to maintain one or more notification channels between one or more applications of the computing device and a network.

PRIORITY APPLICATION

This application claims priority under 35 U.S.C. Section 120 as acontinuation application of U.S. patent application Ser. No. 13/229,325entitled “Keep Alive Management” filed Sep. 9, 2011, the content ofwhich is incorporated by reference herein in its entirety.

BACKGROUND

Users have access to an ever increasing variety of computing devicesthat may be configured for network usage. For example, users mayinteract with a desktop computer, a mobile phone, a tablet computer, andso on to interact via wired or wireless networks.

Conventional techniques that were employed to access these networks,however, were often inefficient and therefore could consume asignificant amount of resources, including power, processing, andnetwork resources. Consequently, these conventional techniques couldlimit functionality available to a user of the device.

SUMMARY

Wake pattern management techniques are described. In one or moreimplementations, network traffic received by a network interface deviceof a computing device is monitored and a traffic pattern is recognizedin the monitored network traffic. An application of the computing deviceis identified that corresponds to the recognized traffic pattern andresponsive to this identification, at least a portion of the identifiedapplication is woken.

In one or more implementations, a traffic pattern is registered ascorresponding to an application configured for execution on thecomputing device. Responsive to recognition of the traffic pattern innetwork traffic while the application is in a suspended state, atransition of at least a portion of the application is triggered fromthe suspended state to an active state.

In one or more implementations, one or more computer-readable storagemedia comprise instructions stored thereon that, responsive to executionby a computing device, cause the computing device to implement anoperating system configured to support a technique to wake at least aportion of a suspended application in response to identification of anincoming packet received via a network interface device of the computingdevice.

Operating system management of network interface devices is alsodescribed. In one or more implementations, a determination is made by anoperating system that network traffic associated with one or moreapplications of the computing device has completed. Responsive to thedetermination, a network interface device is caused to transition to amode to reduce power consumption of the network interface device by theoperating system.

In one or more implementations, a network interface device is madeavailable to one or more applications of the computing device by anoperating system when the network interface device is in a high powermode. The network interface device is made unavailable to the one ormore applications of the computing device by the operating system whenthe network interface device is in a low power mode.

In one or more implementations, one or more computer-readable storagemedia comprise instructions stored thereon that, responsive to executionby a computing device, causes the computing device to implement anoperating system configured to support a technique restrict access byone or more applications of the computing device to a network interfacedevice that is placed in a mode to reduce power consumption, the networkinterface device configured to wake from the mode in response to receiptof a push notification.

Keep alive management techniques are also described. In one or moreimplementations, a keep alive interval is calculated by an operatingsystem of the computing device. The keep alive interval is used tomaintain one or more notification channels between one or moreapplications of the computing device and a network.

In one or more implementations, a determination is made for each of aplurality of applications executable on the computing device of one ormore server timeout intervals specified to maintain a notificationchannel with a respective endpoint via a network. A keep alive intervalis calculated from the one or more server timeout intervals for each ofthe plurality of applications. The keep alive interval is used to wake anetwork interface device as specified to maintain the notificationchannels.

In one or more implementations, one or more computer-readable storagemedia comprise computer executable instructions that, responsive toexecution by a computing device, cause the computing device to implementan operating system configured to use a keep alive interval to maintainnotification channels between a plurality of applications that areexecutable on the computing device and respective one or more endpointsvia a network, the keep alive interval calculated based on a one or morenetwork timeout intervals of one or more intermediary devices of thenetwork and one or more server timeout intervals of respective endpointswith which the one or more applications communicate via the network.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

BRIEF DESCRIPTION OF THE DRAWINGS

The detailed description is described with reference to the accompanyingfigures. In the figures, the left-most digit(s) of a reference numberidentifies the figure in which the reference number first appears. Theuse of the same reference numbers in different instances in thedescription and the figures may indicate similar or identical items.

FIG. 1 is an illustration of an environment in an example implementationthat is operable to employ a network broker module to manage networkcommunication of one or more applications of a computing device.

FIG. 2 is an illustration of a system in an example implementationshowing the network broker module of FIG. 1 in greater detail asemploying a wake pattern manager module.

FIG. 3 is a flow diagram depicting a procedure in an exampleimplementation in which recognition of a traffic pattern is used totransition at least a portion of an application from a suspended stateto an active state.

FIG. 4 is a flow diagram depicting another procedure in an exampleimplementation in which recognition of a traffic pattern is used to wakeat least part of an application.

FIG. 5 is an illustration of a system in an example implementationshowing the network broker module of FIG. 1 in greater detail asemploying a network device manager module.

FIG. 6 is an illustration of another system in an example implementationshowing example operation of a network device manager module.

FIG. 7 depicts an example implementation showing a network interfacedevice quiet transition.

FIG. 8 depicts an example implementation showing a network interfacedevice active transition.

FIG. 9 depicts an example implementation showing a system sleeptransition.

FIG. 10 depicts an example implementation showing a system resumetransition.

FIG. 11 is a flow diagram depicting a procedure in an exampleimplementation in which a determination is made that network traffic hascompleted and a network interface device is transitioned to a low powermode by an operating system.

FIG. 12 is a flow diagram depicting a procedure in an exampleimplementation in which a network interface device is made unavailableto applications during a lower power mode.

FIG. 13 is an illustration of a system in an example implementationshowing the network broker module of FIG. 1 in greater detail asemploying a keep alive manager module.

FIG. 14 is an illustration of a system in an example implementationshowing an example implementation of calculating and adjusting a keepalive interval of FIG. 13.

FIG. 15 depicts a procedure in an example implementation in which a keepalive interval is calculated and used to maintain one or morenotification channels.

FIG. 16 depicts a procedure in an example implementation in which a keepalive interval is calculated to batch keep alive communications fromapplications.

FIGS. 17 and 18 depict systems showing implementation examples of anetwork connectivity broker of FIG. 1.

FIG. 19 illustrates an example system that includes the computing deviceas described with reference to FIG. 1.

FIG. 20 illustrates various components of an example device that can beimplemented as any type of computing device as described with referenceto FIGS. 1, 2, 5-10, 13, 14, and 17-19 to implement embodiments of thetechniques described herein.

DETAILED DESCRIPTION Overview

Network connected applications typically involve an ability to maintaina long running connection in order to stay “up to date.” However, underconventional techniques this may come at the expense of keeping anetwork interface device (e.g., a network interface card) connected toensure reachability, which may adversely affect resource usage of acomputing device. For example, conventional techniques allowedapplications and services of a computing device unfettered access to thenetwork interface device. Hence, an operating system was typically notaware at any given point in time if the network interface device wasbeing used by an application. This may prevent the device from goinginto a low power mode until an idle is detected, which may take thirtyseconds and thus may cause a significant impact on a power supply, e.g.,battery life.

Accordingly, techniques are described herein in which an operatingsystem component called a network broker module may be utilized tocoordinate use of the network interface devices of the computing device.For example, the network interface device may employ a wake patternmanager module to determine which applications of the computing device,if any, are to be woken in response to receipt of network traffic. Thewake pattern manager module, for instance, may detect whether apre-registered pattern is present in the network traffic, and if so,wake a corresponding application. In this way, the wake pattern managermodule may allow applications that leverage network connects to entire asuspended state yet still provide an “always on/always connected” userexperience. Further discussion of the wake pattern manager module may befound in relation to FIGS. 2-4.

In another example, the network broker module may incorporatefunctionality of a network device manager module. The network devicemanager module may be used to cause the network interface device toenter a low power mode when the module determines that network trafficinvolving applications of the computing device has completed, e.g., bymonitoring callbacks. Thus, the network device manager module 126 of theoperating system may be positioned as an intermediary between thenetwork interface device and the applications. As an intermediary, theoperating system may have knowledge of networking activity and thereforecan deterministically tell if the network interface device can enter alow power mode, e.g., a network quiet mode. Further discussion of thenetwork device manager module may be found in relation to FIGS. 5-12.

In a further example, the network broker module may incorporatefunctionality of a keep alive manager module. The keep alive managermodule may be used to “keep alive” network connections (e.g.,notification channels) while applications are in a suspended state, andthus may lower resource usage associated with the applications. Further,the keep alive manager module may be used to allow the network interfacedevice to enter a low power mode and “wake” to maintain the networkconnections and thus may lower resource usage associated with thenetwork interface device, itself. A variety of other functionality mayalso be incorporated by the keep alive manage module, such as todynamically determine a keep alive interval, further discussion of whichmay be found in relation to FIGS. 13-18.

In the following discussion, an example environment is first describedthat may employ the techniques described herein. Example sections arethen used to describe example functionality of the wake pattern managermodule, network device manager module, and keep alive manager module. Animplementation example is then described which may incorporatefunctionality from the previously described sections. It should bereadily apparent that the techniques described herein are not limited toperformance in the example environment and the example environment isnot limited to performing the example techniques.

Example Environment

FIG. 1 is an illustration of an environment 100 in an exampleimplementation that is operable to employ network broker techniquesdescribed herein. The illustrated environment 100 includes a computingdevice 102 that includes a processing system 104 (e.g., one or moreprocessors, functional blocks), memory 106, a power source 108, adisplay device 110, and one or more network interface devices 112configured to provide network connections (e.g., notification channels)vi a network 114. In the following discussion represented entities maybe indicative of one or more entities and thus reference may be madeinterchangeably to single or plural forms of the entities, e.g., networkinterface device 112, the network interface devices 112, and so on.

The computing device 102 may be configured in a variety of ways. Forexample, the computing device 102 may be configured as a computer thatis capable of communicating over the network 114, such as a desktopcomputer, a mobile station, an entertainment appliance, a set-top boxcommunicatively coupled to a display device, a wireless phone, a gameconsole, and so forth. Thus, the computing device 102 may range fromfull resource devices with substantial memory and processor resources(e.g., personal computers, game consoles) to a low-resource device withlimited memory and/or processing resources (e.g., traditional set-topboxes, hand-held game consoles). Additionally, although a singlecomputing device 102 is shown, the computing device 102 may berepresentative of a plurality of different devices, such as multipleservers utilized by a business to perform operations (e.g., a serverfarm), a remote control and set-top box combination, an image capturedevice and a game console, and so on.

Although the network 114 is illustrated as the Internet, the network mayassume a wide variety of configurations. For example, the network 114may include a wide area network (WAN), a local area network (LAN), or anintranet and thus the network interface device 112 may be configured toaccess these networks via a wired connection. The network 114 may alsobe configured for access via wireless techniques, such as a wirelesswide area network (WWAN), a wireless local area network (WLAN), acellular network (e.g., a 3G, 4G, LTE network), and so on. The networkinterface device 112 may be representative of physical devices and alsovirtual network devices, such as those used to support a virtual privatenetwork, tunneling, and so on. Thus, although a single network 114 isshown, the network 114 may be representative of a plurality of networks.

The computing device 102 is further illustrated as including anoperating system 116. The operating system 116 is configured to abstractunderlying functionality of the computing device 102 to applications118, 120 that are executable on the computing device 102. For example,the operating system 116 may abstract processing system 104, memory 106,power source 108 (e.g., battery or wired connection), and/or displaydevice 110 functionality of the computing device 102 such that theapplications 118, 120 may be written without knowing “how” thisunderlying functionality is implemented. The applications 118, 120, forinstance, may provide data to the operating system 116 to be renderedand displayed by the display device 112 without understanding how thisrendering may be performed.

Likewise, the operating system 116 may also abstract network connectionfunctionality to the applications 118, 120 through use of a networkbroker module 122. The network broker module 122 is representative offunctionality to manage usage of the network interface device 112 by theapplications 118, 120 as well as operation of the network interfacedevice 112 itself.

As previously described the network broker module 122 may incorporate avariety of different functionality to perform this management. Forexample, the network broker module 112 may incorporate a wake patternmanager module 124 that is configured to wake one or more of theapplications 118, 120 upon identification of a particular trafficpattern. The particular traffic pattern, for instance, may bepre-registered by the application and thus when the pattern isrecognized, the wake pattern manager module 124 may wake thecorresponding one of the applications 118, 120 as opposed toconventional techniques in which an entirety of the computing device 102was woken, including each of the applications 118, 120. Furtherdiscussion of the wake pattern manager module 124 may be found inrelation to FIGS. 2-4.

The network broker module 122 is also illustrated as including a networkdevice manager module 126. As mentioned earlier, this module isrepresentative of functionality to manage operation of the networkinterface device 112 as well as availability of the network interfacedevice 112 to applications 118, 120 of the computing device 102. Thismay include causing the network interface device 112 to enter a mode toreduce power consumption when the network device manager module 126determines that network traffic involving the applications 118, 120 hascompleted.

Additionally, the network device manager module 126 may make the networkinterface device 112 unavailable to the applications 118, 120 forperiods of time in this mode such that the applications 118, 120 do notunnecessarily wake the network interface device 112. In this way, thenetwork device manager module 126 may “black hole” communications fromapplications 118, 120 to the network interface device. Furtherdiscussion of the network device manager module 126 may be found inrelation to its corresponding section in the following discussion thatbegins in relation to FIGS. 5-12.

The network broker module 122 is further illustrated as including a keepalive manager module 128. The keep alive manager module 128 isrepresentative of functionality that may be used to maintain networkconnections, even for applications 118, 120 in a suspended state. Thekeep alive manager module 128, for instance, may communicate with one ormore servers of a network service to keep active a network connectionbetween the service and the computing device 102 over the network 114.The keep alive manager module 128 may also include functionality todynamically determine an interval at which this activity is to occur andthus may further conserve resources of the computing device 102. Furtherdiscussion of the keep alive manager module 128 may be found in relationto its corresponding section in the following discussion that begins inrelation to FIGS. 13-18.

Although the network broker module 122 and its corresponding wakepattern manager module 124, network device manager module 126, and keepalive manager module 128 are illustrated as part of the operating system116, it should be readily apparent that this functionality may beimplemented by a variety of different entities. Examples of suchentities include standalone applications, third-party plugins, and soon.

Generally, any of the functions described herein can be implementedusing software, firmware, hardware (e.g., fixed logic circuitry), or acombination of these implementations. The terms “module,”“functionality,” and “logic” as used herein generally representsoftware, firmware, hardware, or a combination thereof. In the case of asoftware implementation, the module, functionality, or logic representsprogram code that performs specified tasks when executed on a processor(e.g., CPU or CPUs). The program code can be stored in one or morecomputer readable memory devices. The features of the network brokertechniques described below are platform-independent, meaning that thetechniques may be implemented on a variety of commercial computingplatforms having a variety of processors.

For example, the computing device 102 may also include an entity (e.g.,software) that causes hardware of the computing device 102 to performoperations, e.g., processors, functional blocks, and so on. For example,the computing device 102 may include a computer-readable medium that maybe configured to maintain instructions that cause the computing device,and more particularly hardware of the computing device 102 to performoperations. Thus, the instructions function to configure the hardware toperform the operations and in this way result in transformation of thehardware to perform functions. The instructions may be provided by thecomputer-readable medium to the computing device 102 through a varietyof different configurations.

One such configuration of a computer-readable medium is signal bearingmedium and thus is configured to transmit the instructions (e.g., as acarrier wave) to the hardware of the computing device, such as via anetwork. The computer-readable medium may also be configured as acomputer-readable storage medium and thus is not a signal bearingmedium. Examples of a computer-readable storage medium include arandom-access memory (RAM), read-only memory (ROM), an optical disc,flash memory, hard disk memory, and other memory devices that may usemagnetic, optical, and other techniques to store instructions and otherdata.

Wake Pattern Manager Module

FIG. 2 is an illustration of a system 200 in an example implementationshowing example operation of a wake pattern manager module 124 of thenetwork broker module 122 of FIG. 1. As previously described,conventional techniques involved actively running processes for anapplication to be reachable. Hence, applications that involve use ofrelatively long running network connections could send and receive dataat any time, which could have a direct impact on the resources of thecomputing device 102, such as battery life.

In this example, however, the operating system 116 may employ thenetwork broker module 122 to support an “always on/always connected”user experience. In this example, the experience is supported throughuse of the wake pattern manager module 124 which may be utilized to wakeparticular applications that are involved in network communication.

The wake pattern manager module 124, for instance, may permit theapplications 118, 120 to register traffic patterns 202 that areindicative of the particular applications 118, 120. For example,application 118 may register a traffic pattern 202 that is differentthat a traffic pattern registered for application 120. Accordingly, thewake pattern manager module 124 may monitor network traffic 204 for thetraffic patterns 202 and wake the corresponding applications 118, 120.

An application developer, for instance, may arrange a contract with thenetwork broker module 122 of the operating system 116 to indicatecertain events and a callback that is to be executed for each of theseevents. The network broker module 122 may then “plumb” a specificpattern of data received by the network interface device 112 via thenetwork 114 as corresponding to one or more of the applications 118, 120that registered for that traffic pattern 202.

Accordingly, the wake pattern manager module 124 of the network brokermodule 122 may interrupt the operating system 116 on receipt of anincoming packet described in a traffic pattern for application 118. Inturn, the operating system 116 may wake the application 118 from asuspended state at the registered callback entry point and indicate thepacket to the application 118. In this way, the wake pattern managermodule 124 may support a technique to trigger a suspended application onan incoming packet from a pre-authorized remote endpoint. Further, thisallows the operating system 116 to plumb a pattern even if the physicalnetwork interface device 112 does not support filtering of incomingpackets, thereby allowing the operating system 115 to filter ingresspackets.

The applications 118, 120 may also be configured to increase efficiencyof resource usage of the computing device 102. For example, application118 may be vectored to form different parts that may be executedseparately. An illustrated example of this for application 118 includesvectoring of network functionality 206 as separate from otherfunctionality 208 of the application 118, such as functionality involvedin the generation of a user interface for the application 118.

Thus, continuing with the previous example the network broker module 122may wake the network functionality 206 of the application 118, such asto indicate a packet that matches the specified traffic patterns 202 andexecute a specific callback of application code without rehydrating codeof the application 118 involved in generating the user interface of theapplication 118. Therefore, the application 118 may be configured torespond to network traffic 204 from a remote server in a resourceefficient manner for data packets, a remote endpoint initiated keepalive, and so on. A variety of other examples of application 118vectoring are also contemplated, such as separation of event handlers ofthe application 118.

The wake pattern manager module 124 may also support techniques tocoalesce data for communication to the applications 118, 120, which mayalso be indicated by the traffic patterns 202. The wake pattern managermodule 124, for instance, may receive data via a variety of differentnotification channels via the network 114 at the network interfacedevice 112. Rather than communicate this data to the applications 118,120 “right away,” the wake pattern manager module 124 may coalesce thisdata for communication to the applications 118, 120 at a definedinterval.

Thus, the resources of the computing device 102 used in executing theapplications 118, 120 may be utilized together to further conserve whenand how these resources are used. For instance, rather than receivingdata for application 118, waking the application 118, and communicatingthe packet to the application 118 and then repeating this for a packetreceived for application 120, these packets may be cached and thenforwarded.

In one or more implementations, the wake pattern manager module 124 mayalso leverage knowledge of user logins. For example, the wake patternmanager module 124 may utilize traffic patterns 202 for a user that isactively logged in to the computing device 102 but not for other users,may use patterns for a user that was most recently logged in, and so on.Naturally other implementations are also contemplated, such asimplementations in which patterns are used for each user that is loggedin, whether active of not.

Thus, an operating system was described that may be configured tosupport a technique to wake at least a portion of a suspendedapplication in response to identification of an incoming packet receivedvia a network interface device of the computing device. Furtherdiscussion of these techniques may be found in relation to the followingprocedures and implementation example.

FIG. 3 depicts a procedure 300 in an example implementation in whichrecognition of a traffic pattern is used to transition at least aportion of an application from a suspended state to an active state.Aspects of the procedure may be implemented in hardware, firmware,software, or a combination thereof. The procedures are shown as a set ofblocks that specify operations performed by one or more devices and arenot necessarily limited to the orders shown for performing theoperations by the respective blocks. In portions of the followingdiscussion, reference will be made to the environment 100 of FIG. 1 andthe system 200 of FIG. 2.

A traffic pattern is registered as corresponding to an applicationconfigured for execution on the computing device (block 302). Thetraffic pattern 202, for instance, may be registered by the application118 during installation of the application 118, through interaction withan API of a wake pattern manager module 124, and so on. Additionally,the traffic pattern 202 may be used to described a variety of differentcharacteristics of network traffic 204, such as identify particularpackets, callbacks, identify particular remote endpoints, and so forth.

Responsive to recognition of the traffic pattern in network trafficwhile the application is in a suspended state, at least a portion of theapplication is transitioned from the suspended state to an active state(block 304). The application 118 may be placed in a suspended state dueto a variety of different factors. For example, the operating system 116may be configured to place the application 118 in a suspended state whenfocus is moved to another application. The focus may be moved byminimizing a user interface of the application, movement of the userinterface (e.g., window) from a foreground in a desktop user interface,navigation away from the user interface of the application 118 in animmersive environment, and so on. Thus, the operating system 116 mayconserve resources of the computing device 102 by suspending executionof applications that are not available, directly, for user interaction.

As previously described, the wake pattern manager module 124 mayrecognize traffic patterns 202 from the network traffic 204 andtransition at least a part of an application 118 (e.g., networkfunctionality 206 but not other functionality 208) into an active stateto process the identified network traffic 204. Thus, the wake patternmanager module 124 may transition a particular application 118 to whichthe network traffic 204 pertains and even a particular portion of theapplication 118. Another example of wake pattern manager module 124usage may be found in relation to the following figure.

FIG. 4 depicts a procedure 400 in an example implementation in whichrecognition of a traffic pattern is used to wake at least part of anapplication. Aspects of the procedure may be implemented in hardware,firmware, software, or a combination thereof. The procedures are shownas a set of blocks that specify operations performed by one or moredevices and are not necessarily limited to the orders shown forperforming the operations by the respective blocks. In portions of thefollowing discussion, reference will be made to the environment 100 ofFIG. 1 and the system 200 of FIG. 2.

Network traffic received by a network interface device of a computingdevice is monitored (block 402). The computing device 102, for instance,may receive network traffic at a network interface device 112, which maybe configured as a physical device, implemented as a virtual device tosupport a VPN and tunneling, and so on.

A traffic pattern is recognized in the monitored network traffic (block404). As before, a variety of different traffic patterns may berecognized, such as packets, sending entities, and so on. From thistraffic pattern, an application of the computing device is identifiedthat corresponds to the recognized traffic pattern (block 406). Forexample, one or more applications may pre-register with the wake patternmanager module 124 to receive particular network traffic. Responsive tothis identification, at least a portion of the identified application iswoken (block 408), such as the network functionality 206, an entirety ofthe application 118, and so on. Further discussion of example operationof the wake pattern manager module 124 may be found in relation to theimplementation example.

Network Device Manager Module

FIG. 5 is an illustration of a system 500 in an example implementationshowing example operation of a network device manager module 126 of thenetwork broker module 122 of FIG. 1. As previously described, thenetwork broker module 122 and consequently the network device managermodule 126 of the operating system 116 may be positioned as anintermediary between the network interface device 112 and theapplications 118, 120. As an intermediary, the operating system 116 mayhave knowledge of networking activity and therefore candeterministically tell if the network interface device 112 may enter alow power mode, e.g., a network quiet mode.

For example, the network device manager module 126 may be used to causethe network interface device 112 to enter a low power mode when themodule determines that network traffic 502 involving applications of thecomputing device has completed, e.g., by monitoring callbacks anddetermining when a last of the callbacks has completed. Thus, thenetwork traffic 502 involves egress traffic from the applications 118,120 in this example.

In response, the network device manger module 126 may cause the networkinterface device 112 to transition from a high power mode 504 to a lowpower mode 502. As the names denote, these modes are differentiated byan amount of power consumed by the network interface device 112 while inthe modes. In one example, the high power mode 504 is configured toenable transmission and receipt of data by the network interface device112. In this example, the low power mode 506 is configured such thattransmission functionality of the network interface device 112 istemporarily disabled and thus has reduced power consumption. Thus, sinceoutbound activity is suppressed and thus just wake patterns are plumbed,it means that the traffic that can impact the system are limited topackets which match the wake pattern, or when the system computes a timeto initiate outbound activity like keep-alive activity. A variety ofother examples are also contemplated.

In this way, the network device manager module 126 may proactivelydetermine when use of the network interface device 112 is no longerdesired for outbound traffic and react accordingly as opposed toprevious techniques that relied on detection of periods of inactivitythat could be as long as thirty seconds. Thus, the knowledge of thenetwork traffic 502 afforded by positioning the operating system 116 asan intermediary may be used to conserve resources of the computingdevice 102.

The network device manager module 126 may also support techniques toprolong and/or maintain the low power mode 506 for the network interfacedevice 112 for a desired period of time. As previously described,conventional techniques permitted unfettered access of the applications118, 120 to the network interface device 112, which could have anadverse effect of resources of the computing device 102. Accordingly,the positioning of the network device manager module 126 as anintermediary between the applications 118, 120 and the network interfacedevice 112 may be used to manage the high power and low power modes 504,506.

For example, the network device manager module 126 may support “blackholing” techniques to restrict access by the applications 118, 120 tothe network interface device 112 while in a low power mode 506. This maybe performed in a variety of ways, such as making the network interfacedevice 112 unavailable, blocking communication of packets from theapplication 118, 120 to the network interface device 112, providing anerror code back to the applications 118, 120 during the low power mode506, indicating a dropped packet event, and so on. Therefore, thenetwork device manager module 126 may limit an ability of theapplications 118, 120 to wake the network interface device 112 from thelow power mode 506 to the high power mode 504, thereby conservingresources of the computing device 102.

The network device manager module 126 may also support techniques tomanage usage of a plurality of different network interface devices 112by managing which of the network interface devices 112 may be accessedat a given point in time. For example, the computing device 102 may beconfigured as a mobile communication device (e.g., wireless phone) andinclude a network interfaces devices 112 configured to communicate overWi-Fi and cellular (e.g., 3G, 4G, LTE) networks.

In an instance in which the network interface device 112 for Wi-Fi is ina high power mode, the network device manager module 126 may cause thenetwork interface device 112 for the cellular network to enter a lowpower mode. Further, applications that attempt to interact with thecellular network may instead be routed to the Wi-Fi network. In thisway, the network connection manager module 126 may prevent theapplications 118, 120 from communicating with the “wrong” networkinterface device 112 and thereby conserve computing device 102 resourcesby not waking that device.

The network device manager module 126 may also be configured to maintainconnectivity while in a low power mode. For example, the applications118, 120 and/or services of the operating system 116 may desire tomaintain Layer 2 connectivity to maintain a connection with an accesspoint. This may involve periodically waking from the low power mode 506at defined intervals to communicate with the access point. Likewise,Layer 3 connectivity may also be maintained using a similar techniquesto maintain an IP address by communicating with a HTTP server, such asfor an instance in which the server is configured to refresh the addressat defined intervals. Further discussion of maintenance of networkconnectivity may be found in the “Keep Alive” section in the followingdiscussion.

FIG. 6 is an illustration of another system 600 in an exampleimplementation showing example operation of the network device managermodule 126. This system 600 is an implementation example of anarchitecture that may be employed for operating system 116 assistedmanagement of the network interface device 112.

The network device manager module 126 is implemented in this example asa logical component residing in ndis.sys 602 and is responsible forcontrolling power modes for the network interface device 112. Thenetwork device manager module 126 may be configured to exposeper-adapter NID Active state (e.g., NIC active state) to supportgranular power control over the network interface devices 112.

NID Active state may be implemented using a reference counter. When thecounter reaches zero, the network device manager module 126 maytransition the network interface device 112 to a low power state. Whenthe counter is incremented from zero to one, the NDIS 602 may bring thenetwork interface device 112 to a high power state, i.e., a “working”power state.

As illustrated, components of the operating system 116 may be used toincrement and/or decrement the reference counter, e.g., by sendingprivate IOCTLs to the NDIS 602, for a variety of purposes. In one ormore implementations, a WCM 604 that is in communication with a powerdependency coordinator (PDC) 606 is a sole component that is permittedto hold the NID Active reference for a “long” time, e.g. an entireduration of the Network Active period. Each of the other components ispermitted to take NID Active reference for duration of a singleoperation, e.g., an IP address renewal.

The WCM 604 may be configured to listen to the network quiet entry/exitevents generated by PDC 606 and translate them to NIC active statesaccording to interface selection logic. WCM 604 may take a referenceupon adapter arrival to prevent NDIS 602 from powering the networkinterface device 112 down.

WWAN 608 may use the NIC Active reference to enable select mediaspecific functionality, e.g., a location scan function requested by alocation sensor service. The WLAN 610 may use the NIC Active referenceto select media specific operations, e.g., vendor specific functionscontrolled by an IHV provided service. The DHCP 612 client may be usedto renew an IP address during a network quiet mode and thus may keep theNID Active reference during this operation to ensure availability of thenetwork interface device 112. TCP/IP 614 may use the NID Activereference counter to keep the network interface device 112 in D0 duringthis operation to refresh IPv6 stateless address auto-configuration 616during a network quiet mode. The NDIS 602 may use a temporary (e.g., 3seconds) NIC Active reference during adapter initialization and uponeach network interface device 112 generated wake signal. Therefore, ifnone of the other components desire use of the network interface device112 by the timeout expiration, the network device manager module 126 maytransition the network interface device 112 to a low power state.

FIG. 7 depicts an example implementation 700 showing a network interfacedevice quiet transition. The implementation 700 includes the NDIS 602 ofFIG. 6 as well as a power manager 702 and a miniport/bus 704. NDIS 602executes this power transition operation when the NID Active referencecounter becomes zero. During the NID quiet transition, the NDIS 602 mayreport the network interface device 112 as idle to the power manager 702and waits for a confirmation before requesting a Dx IRP for the device.

FIG. 8 depicts an example implementation 800 showing a network interfacedevice active transition. The implementation 800 includes the NDIS 602of FIG. 6 as well as a power manager 702 and a miniport/bus 704 of FIG.7. In the illustrated example, the NDIS 602 executes this powertransition operation when the NID Active reference counter goes fromzero to one. The NDIS 602 may request a device active state from thepower manager 702 and wait for the “Power Required Callback.” From thiscallback, the NDIS 602 requests D0 IRP for the device. Upon D0 IRPcompletion, the NDIS 602 waits for an “Active Condition Callback” beforecommunicating the updated power state to the miniport/Bus 704 driver.

FIG. 9 depicts an example implementation 900 showing a system sleeptransition. The implementation 900 also includes the NDIS 602 of FIG. 6as well as a power manager 702 and a miniport/bus 704 of FIG. 7. Duringthe system sleep transition, the NDIS 602 suspends power frameworkmanagement by the power manager 702 for the device and waits for theconfirmation before requesting a Dx IRP.

FIG. 10 depicts an example implementation 1000 showing a system resumetransition. The implementation 900 also includes the NDIS 602 of FIG. 6as well as a power manager 702 and a miniport/bus 704 of FIG. 7. Duringa system resume transition, the NDIS 602 requests a D0 IRP for thenetwork interface device 112 and causes power framework operations to beresumed by the power manager 702 upon D0 IRP completion.

FIG. 11 depicts a procedure 1100 in an example implementation in which adetermination is made that network traffic has completed and a networkinterface device is transitioned to a low power mode by an operatingsystem. Aspects of the procedure may be implemented in hardware,firmware, software, or a combination thereof. The procedures are shownas a set of blocks that specify operations performed by one or moredevices and are not necessarily limited to the orders shown forperforming the operations by the respective blocks. In portions of thefollowing discussion, reference will be made to the environment of FIG.1 and the systems and example implementations of FIGS. 5-10.

A determination is made by an operating system that network trafficassociated with one or more applications of the computing device hascompleted (block 1102). This determination may be made in a variety ofways. For example, the network device manager module 126 may monitoroutbound and inbound traffic involving the applications 118, 120 and thenetwork interface device 112. The network device manager module 126 maythus determine when replies have been provided to requests, e.g.,callbacks have been completed. In this way, the network device managermodule 126 may determine when each of the operations have been completedwithout waiting for a prescribed “idle” period.

Responsive to the determination, a network interface device is caused totransition to a mode to reduce power consumption of the networkinterface device by the operating system (block 1104). Continuing fromthe previous example, the network device manager module 126 maydetermine that the network traffic 502 has completed, and thereforecause the network interface device 112 to enter a mode to reduce powerconsumption, e.g., a low power mode 506.

The network device manager module 126 may also provide a variety offunctionality for use in conjunction with this mode. For example, thenetwork device manager module 126 may cause the network interface device112 to maintain connectivity with a wireless access point, by theoperating system, while in the mode to reduce power consumption (block1106). Thus, in this example the network interface device 112 maymaintain a layer two connection as previously described. In anotherexample, the network device manager module 126 may cause the networkinterface device 112 to maintain an Internet Protocol (IP) address, bythe operating system, while in the mode to reduce power consumption(block 1108). Therefore, in this example the network interface device112 may maintain a layer three connection to refresh the IP address ofthe network interface device 112. A variety of other examples are alsocontemplated.

The network interface device may also be configured to wake upon receiptof a pre-registered notification (block 1110). For example, even thoughthe network interface device 112 is placed in a low power mode 506, thenetwork interface device 112 may be configured to receivecommunications, e.g., inbound packets. These notifications may bepre-registered such that particular notifications cause the networkinterface device 112 to wake from a network quite mode and communicatewith the operating system 116, such as to indicate a particular endpointthat originated the communication. A variety of other types ofpre-registrations are also contemplated, such as a specific four tuplepattern contained in the data as described in relation to theimplementation example.

FIG. 12 depicts a procedure 1200 in an example implementation in which anetwork interface device is made unavailable to applications during alower power mode. Aspects of the procedure may be implemented inhardware, firmware, software, or a combination thereof. The proceduresare shown as a set of blocks that specify operations performed by one ormore devices and are not necessarily limited to the orders shown forperforming the operations by the respective blocks. In portions of thefollowing discussion, reference will be made to the environment of FIG.1 and the systems and example implementations of FIGS. 5-10.

A network interface device is made available to one or more applicationsof a computing device by an operating system when the network interfacedevice is in a high power mode (block 1202). The network device managermodule 112, for instance, may expose the network interface 112 asavailable for communication using the network 114 to send and receivedata.

The network interface device is made unavailable to one or moreapplications of a computing device by an operating system when thenetwork interface device is in a low power mode (block 1204). Thenetwork device manager module 126, for instance, may enforce a networkquite mode to reduce power consumption, such as in response to adetermination that network traffic involved by the applications 118, 120has completed. This quiet mode may have a defined amount of time, may beexited in response to an event, and so on. This unavailability mayinclude use of the “black hole” techniques described earlier such thatthe applications 118, 120 are not permitted to “wake” the networkinterface device 112 during this time.

Another network interface device is made available to the one or moreapplications while the network interface device is made unavailable(block 1206). As previously described the computing device 102 mayinclude a plurality of network interfaces devices. Accordingly, thenetwork device manager module 126 may manage which of the devices areplaced in high or low power modes to conserve resources of the computingdevice, such as to make a single one of the network interface devices112 available for an Internet connection.

The network device manager module 126, for instance, may employ routingtechniques to prevent inadvertent waking of a “wrong” network interfacedevice 112. Continuing with the previous example, data received from theone or more applications that is specified for communication using thenetwork interface device that is made unavailable is routed to the othernetwork interface device (block 1208). This may be used, for instance,to route data intended by an application 118 for communication using acellular network interface device that is inactive to be routedautomatically to an active network interface device, such as a Wi-Fidevice.

Thus, an operating system may be configured to support a technique torestrict access by one or more applications of the computing device to anetwork interface device that is placed in a mode to reduce powerconsumption. Further, the network interface device configured to wakefrom the mode in response to receipt of a notification, such as a pushnotification from a particular endpoint. Additional discussion ofmaintenance of network connections may be found in relation to thefollowing section.

Keep Alive Manager Module

FIG. 13 is an illustration of a system 1300 in an example implementationshowing example operation of a keep alive manager module 128 of thenetwork broker module 122 of FIG. 1. The keep alive manager module 128is representative of functionality of the network broker module 122 tomaintain notification channels over a network 114. For example, the keepalive manager module 128 may be utilized to calculate a keep aliveinterval 1302 that defines an interval between network communications1304 that is sufficient to keep a notification channel open between theapplications 118, 120 and an endpoint 1306, e.g., a server of a networkservice. Thus, the keep alive interval 1302 may be calculated todescribe a frequency of communication to maintain state of communicationvia the network 114, e.g., via one or more notification channels.

The network broker module 112 may manage a variety of differentnotification channels. Application 118, for instance, may be configuredto support email communication and therefore interact with an emailservice endpoint. The application 118 may also be configured to supportinstant messaging and therefore may communication with another endpoint(e.g., a server of an instant messaging service). Thus, a singleapplication 118 may support a plurality of notification channels.Additionally, the applications 118, 120 may also communicate with a sameendpoint using different notification channels. Thus, the keep alivemanager module 128 may address a variety of different notificationchannels that involve communication via the network 114.

Additionally, the keep alive manager module 128 may calculate the keepalive interval 1302 in a variety of ways. In one such implementation,the keep alive interval 1302 may be calculated based on server timeoutinterval of an endpoint 1306 with which the application 118 is tocommunicate, e.g., via a notification channel. For example, the servertimeout interval may be determined by the keep alive manager module 128based on a known timeout specified by an application that is configuredto interact with the endpoint 1306.

Application 118, for instance, may be configured to interact with aspecific endpoint, such as a social network service. This applicationmay therefore be coded with “knowledge” of the server timeout intervalof that timeout such that the application 118 may be configured tomaintain a notification channel with that endpoint, e.g., cause acommunication to be sent to maintain state with the endpoint 1306.Therefore, in this example the keep alive manager module 128 maydetermine this interval from the application 118 itself. Other examplesare also contemplated, such as to determine the server timeout intervalof the endpoint 1306 a priori, may be based on monitored interactionbetween the computing device and the endpoint 1306 (e.g., by detectingfailures and readjusting), and so forth.

In another such implementation, the keep alive interval 1302 may becalculated using a network timeout interval to address intermediarydevices 1308 of the network 114. For example, a network connectionbetween the network interface device and the endpoint 1306 may involve avariety of intermediary devices 1308, such as a network addresstranslation device, a proxy, firewall, wireless access point, and so on.The network timeout interval may be determined by the keep alive managermodule 128 in a variety of ways.

For example, the keep alive manager module 128 may connect via thenetwork 114 and corresponding intermediary devices 1308 with an endpointthat has a “known” or “known-to-be-long” server timeout interval, suchas a test device made available for such a determination. The keep alivemanager module 128 may then monitor a connection with this knownendpoint to determine when the intermediary devices 1308 have “timedout” and therefore determine the network timeout interval of theintermediary devices 1308. This network timeout interval may be saved bythe keep alive manager module 128 for use in calculating the keep aliveinterval 1302. For instance, this network timeout interval may be savedas specific for a particular network via which the network interfacedevice 112 accesses the network 114.

In one or more implementations, the keep alive interval 1302 may becalculated based on the server timeout interval of the endpoint 1306,the network timeout interval of intermediary devices 1308, and even bothintervals. The keep alive interval 1302, for example, may be calculatedby the keep alive manager module 128 to efficiently utilize resources ofthe computing device 102 in maintaining the notification channels. Forinstance, the keep alive manager module 128 may determine that thenetwork timeout interval is 15 seconds and the server timeout intervalis 20 seconds. Therefore, the keep alive manager module 128 may wake thenetwork interface device 112 at fifteen second intervals to communicatewith the endpoint 1306 and thus keep the endpoint 1306 and theintermediary devices 1308 active. Thus, in this instance the keep alivemanager module 128 may avoid waking the network interface device 112 atboth fifteen and twenty second intervals yet enable both devices tomaintain state.

Thus, a single network timeout value may be calculated and a minimum ofthese values (e.g., a baseline floor) to compute a coalesced time thatdescribes when concurrent “keep alives” are sent. Thus, the networktimeout interval may apply to the plurality of server connections.

Additionally, one or more implementations may address network connectionbeing lost. Networks may be inconsistent such that connections may belost from time to time. When that occurs, the persistent connection to aserver may be severed. Thus, these implementations may employ an abilityto automatically detect when the network is available again. Forexample, on a Wi-Fi network this may be done in hardware or firmware inan efficient manner via a “network list offload,” via an operatingsystem itself, and so on. Thus, an operating system may notify thisclass of applications of the presence of the network via a callbackroutine, and these applications may then reestablish a connection, e.g.,a long-lived connection to the push notification server. Therefore, acoalesced notification may be performed to allow the plurality ofcommunication applications to reestablish connections, which may be usedto optimize use of local computing resources as well as optimizing theuse of the network interface device resource.

Techniques may also be used by the keep alive manager module 128 toaddress the applications 118, 120. For example, the keep alive managermodule 128 may be configured to batch communications to be sent by theapplications 118, 120 to maintain notification channels. Thus, likebefore the keep alive interval 1302 may be configured for efficientutilization of resources of the computing device 102, e.g., a powersource 108.

For instance, the keep alive manager module 128 may determine thatapplication 118 is configured to initiate a “keep alive” communicationat ten second intervals and application 120 is configured to initiate a“keep alive” communication at eight second intervals. Therefore, thekeep alive manager module 128 may wake the network interface device 112at eight second intervals for both applications 118, 120 to perform thecommunications. In this way, the keep alive manager module 128 maycoalesce application 118, 120 initiated “keep alives” for notificationchannels to various endpoints 1306 to save power and other resources.Thus, the keep alive manager module 128 may base the keep alive interval1302 on a variety of factors and may also adjust the keep alive interval1302, further discussion of which may be found in relation to thefollowing figure.

FIG. 14 is an illustration of a system 1400 in an example implementationshowing an example implementation of calculating and adjusting a keepalive interval of FIG. 13. As previously described, maintenance of anotification channel through intermediate network devices may be anissue of applications 118, 120 that access a network 114. Traditionaltechniques involved a hardcoded value that defined an interval tosend/receive packets to preserve state. However, techniques aredescribed herein in which a dynamic keep alive interval is calculated,e.g., using a test connection to a given remote destination, throughexamination of applications 118, 120 on the computing device 102 itself,through use of network and server timeout intervals, and so on.

The system 1400 of FIG. 14 illustrates an example of adjusting a keepalive interval 1302 of FIG. 13. In this example, an initial calculatedkeep alive interval is set at an initialize stage as T=T(max) (block1402). Reference points are then tried that are lower than the current T(block 1404). This may involve polling of W(min) with T(min) in which Wrepresents the reconnect time between polling (block 1406). This mayalso involve aggressive tuning in which T is incremented by V and cappedat T(max) (block 1408), where V represents an increment of theaggressive tuning. The system 1400 may also involve fine tuning in whichthe value is incremented by V/Y, wherein Y represents the 1/Y ofaggressive increment. These values may be leveraged to determine asteady state in which T—detected value and T(LKG) is absolute time. Inthe diagram, Z represents a number of retries performed, which may beset to address network errors and X represents of number of successfulkeep alives (KAs). Further discussion of operation of the keep alivemanager module 128 may be found in relation to the following procedures.

FIG. 15 depicts a procedure 1500 in an example implementation in which akeep alive interval is calculated and used to maintain one or morenotification channels. Aspects of the procedure may be implemented inhardware, firmware, software, or a combination thereof. The proceduresare shown as a set of blocks that specify operations performed by one ormore devices and are not necessarily limited to the orders shown forperforming the operations by the respective blocks. In portions of thefollowing discussion, reference will be made to the environment of FIG.1 and the systems and example implementations of FIGS. 13-14.

A keep alive interval is calculated by an operating system of acomputing device (block 1502). As described in relation to FIGS. 13 and14, the keep alive interval may be calculated in a variety of ways, suchas based on a network timeout interval, server timeout interval, basedon keep alive communication scheduling for a plurality of applications118, 120, and so on.

The keep alive interval is used to maintain one or more notificationchannels between one or more applications of the computing device and anetwork (block 1504). The keep alive manager module 128, for instance,may monitor network communication to send and receive data vianotification channels. If one or more of the notification channelsreaches a keep alive interval without involving network communication1304, the keep alive manager module 128 may maintain the channel bycommunicating with a respective endpoint 1306.

The keep alive interval may also be adjusted based on monitored usage ofthe keep alive interval by the operating system (block 1506). Forexample, the keep alive manager module 128 may determine that anotification channel has ceased to function due to reaching a network orservice timeout interval. The keep alive manager module 128 may thenadjust the keep alive interval 1302 “downward,” (e.g., lessen an amountof time defined by the interval) to an amount of time that is less thanthe observed amount of time in which the channel timed out. Naturally,other examples are also contemplated, such as to increase the keep aliveinterval 1302 as described in relation to FIG. 14.

FIG. 16 depicts a procedure 1600 in an example implementation in which akeep alive interval is calculated to batch keep alive communicationsfrom applications. Aspects of the procedure may be implemented inhardware, firmware, software, or a combination thereof. The proceduresare shown as a set of blocks that specify operations performed by one ormore devices and are not necessarily limited to the orders shown forperforming the operations by the respective blocks. In portions of thefollowing discussion, reference will be made to the environment of FIG.1 and the systems and example implementations of FIGS. 13-14.

A determination is made for each of a plurality of applicationsexecutable on a computing device of one or more server timeout intervalsspecified to maintain a notification channel with a respective endpointvia a network (block 1602). The keep alive manager module 128, forinstance, may examine applications 118, 120 to determine a servertimeout interval to be used by the respective applications to maintainnotification channels with respective endpoints.

A keep alive interval is calculated from the one or more server timeoutintervals for each of the plurality of applications (block 1604). Asdescribed in relation to FIG. 13, the keep alive manager module 128, maydetermine the keep alive interval 1302 based on efficiency of resourceusage for the different server timeout intervals. The keep aliveinterval may then be used to wake a network interface device asspecified to maintain the notification channels (block 1606). Forexample, the keep alive manager module 128 may determine that networkcommunication 1304 has not occurred for either of the communicationchannels while the network interface device 112 is in a low power mode.Accordingly, the keep alive manager module 128 may wake the networkinterface device 112 to communicate with the respective endpoints 1306at the keep alive interval 1302 to efficiency utilize the resources ofthe computing device 102. A variety of other examples are alsocontemplated as described above and as further described in relation tothe following implementation example.

Implementation Example

FIGS. 17 and 18 depict systems 1700, 1800 showing implementationexamples of the network connectivity broker 122 of FIG. 1. As previouslydescribed in relation to FIG. 1, support of a system state called“connected standby” in system-on-chip based devices may provide anopportunity for enabling an “Always On, Always Connected” (AOAC) userexperience. For example, an application may be suspended when not “infocus,” e.g., not in foreground. As a result, a network 114 and networkinterface devices 112 may enter a “network quiet mode” (netqm). In thismode, the operating system 116 may prevent outgoing packets from thedevice, while ensuring that L2 connectivity and L3 identity aremaintained. An indication from a component referred to as a powerdependency coordinator (PDC) to exit the quite mode. Upon completion oftasks that involve network 114 connects, the network broker module 122may cause the network interface device 112 to again enter a networkquiet mode and remain in this state until PDC indicates an exit event.

An overview of a system 1700 that incorporates this design is shown inFIG. 17. The figure shows a chat application (e.g., configured for chatvia the network 114) that includes a lightweight chat stub 1704, whichis configured to handle connections and other bookkeeping for the chatapplication 1702. The chap application 1702 also includes a relatively“heavyweight” chat UI 1706 portion of the application 1702 is separatedfrom the lightweight connection stub represented by the chat stub 1704.This is one of a variety of techniques that may be used to vectorfunctionality of the application 1702.

A process lifetime manager 1708 is also illustrated as representingfunctionality to manage a lifecycle of the application 1702. In otherwords, when the application 1702 is tasked away from the user focus(e.g., moved to background), the PLM 1708 may terminate the chat UI 1706process and suspend the chat stub 1704 in memory.

The system 1700 may leverage a kernel broker infrastructure thatincludes a mechanism to rehydrate the chat stub 1704 when an interestingevent occurs for the application 1702 as described previously. In thisway, resources of the computing device may be conserved, e.g., a CPU ofthe computing device 102 may enter a quiet mode and stay in this modeuntil an incoming message triggers a wake, a kernel brokers wake thesystem for periodic activity, and so on.

The network connectivity broker (NCB) 1710 (which may or may notcorrespond to the network broker module 122 of FIG. 1) may employ avariety of functionality, which is represented as a wake pattern manager1712 and a keep alive manger 1714. The wake pattern manager (WPM) 1712is configured to ensure that the application 1702 can “re-hydrate” upona network event, e.g., wake upon a detection of a specific pattern.

The keep alive manager 1714 is configured to ensure that a notificationchannel is a maintained for the application 1702, e.g., for reachabilityfrom a cloud service for incoming push notifications. For example, theapplication 1702 may register a work item with the BI 1802 of FIG. 18thereby indicating to the operating system 116 that the application 1702is interested in keep alive activity. The operating system 116 may thendetermine an appropriate coalesced keep alive interval to wakeapplications 1702 that have registered a callback to indicate thatoutbound packet activity is permitted for a pre-defined amount of time,e.g., for a few seconds. The BI 1802 may “sandbox” work items in termsof CPU and memory resources. This allows the application 1702 to performa periodic “keep alive” to a respective endpoint (e.g., service “in thecloud”) to maintain reachability. This may also be used to limit anability of the applications from inefficient use of resources due to anoverabundance of “keep alives.”

The operating system, in conjunction with a notification service (e.g.,a Windows Notification Service) may be used determine a dynamic keepalive interval as previously described. The dynamic keep alive interval,for instance, may be implemented as an “exponential back-off” whichdoubles an amount of time defined by the interval startingconservatively at four minute interval and incrementing to a value thatthe connection is still maintained. The notification service may use atest connection for this purpose to determine the dynamic interval. Inone or more implementations, the keep alive manager 1714 does notdistinguish between the application state or the system to be inconnected standby or Active/ON, although other implementations are alsocontemplated.

The wake pattern manager 1712 is representative of functionality toplumb an appropriate wake pattern for a network interface device, suchas a network interface card (NIC) 1716. The wake pattern manager 1712may cause the NIC 1716 to go into a “Wake on LAN” mode upon networkquiet mode entry. The NIC 1716, for instance, may transition to a D3mode in which the NIC 1716 is configured to accept and deliver anincoming packet if it matches a set of wake patterns. If so, the maycause the NIC 1716 to transition to an active state. Wake patterns maybe derived from a variety of sources, such as “<SrcAddr, DstAddr,SrcPort, DstPort, TransportProtocol>” for each wake-enabled connection.In one or more implementations, the NIC 1716 passes the incoming packetthat caused the wake up to the protocol stack (as opposed todiscarding/dropping it) since the loss of such a packet may impact thereal-time responsiveness for applications that support features such asVoIP.

A Runtime API surface may also be exposed to applications that areconfigured to make use of the keep alive and remote wake functionalityprovided by the operating system 116. This library may be used to allowapplications to perform a variety of functions, including:

-   -   Indicate creation of notification channels (e.g., BeginSetup);    -   Indicate the setup completion of notification channels (e.g.,        EndSetup);    -   Set desired keep alive interval in minutes (e.g.,        ServerKeepAlivelntervalTime);    -   Register Background Task handlers for keep alive events and        remote wake events; and    -   Indicate to the system that the keep alive interval was not        sufficient (e.g., DecreaseKeepAlivelnterval).

Because a notification system may be implemented as an inbox componentthat is continually executing, a work item code to be executed for keepalive events may be triggered by an Activation Proxy method. Theactivation proxy may be hidden inside a runtime library and activatedthrough a private API. A NCB service check may be used to check anintegrity level of the process. The proxy creates WNF events and listensto a WNF channel for WNF event messages. The background task handler fornotification service may be invoked by the proxy when BI (as a result ofNCB service/TCPIP.sys calling BiSignalEvent) publishes a WNF eventmessage.

A runtime API library may use LRPC to communicate with the NCBsubservice (Ncbsvc.dll) hosted within the IP Helper service to provide akeep alive time to a NCB and receive the event names for keep alive andwake events. The runtime API may then call broker infrastructure APIs toassociate application provided callbacks with broker infrastructureprovided events.

The system 1800 of FIG. 18 includes an NCB registrar 1804, which isconfigured to isolate the actual communication interfaces used by an NCBservice 1806 to speak to the rest of the operating system 116. Forinstance, the RPC used by the runtime APIs may be isolated in the NCBRegistrar. The Registrar may open an RPC server endpoint and listen toapplications. The applications may use the runtime library describedabove to connect to this RPC endpoint.

Similarly, actual BI 1802 API access may be hidden inside the NCBregistrar 1804 as illustrated. This allows the keep alive manager 1714to be isolated from architectural changes. The NCB registrar 1804 maycall the BI 1802 APIs to create “keep alive” and “wake” events. Theother part of the NCB registrar 1804 may involve communicating with aWPM 1808.

The keep alive provider interface 1810 is configured to allow a WNS toregister as a keep alive interval provider, and may use LRPC forcommunicating with the WNS. The WNS may provide keep alive intervalestimates using callbacks registered by the keep alive providerinterface 1810.

The keep alive provider interface 1810 may cache the estimates on a pernetwork (NLM ID) basis in an NLM cache library 1812. This NLM cache maybe accessed through a library that may be common between the keep aliveprovider interface and a DA site manager.

The keep alive manager 1714 may be configured to request a keep aliveinterval estimate from a keep alive provider. A timer (that may becoalesced) may be created using a “SetThreadPoolTimer” API. The time maybe set as the minimum of T_WNS and T_APP—the keep alive intervalrequested by the application.

When the keep alive timer expires, the keep alive manager 1714 maysignal a keep alive event by calling the NCB registrar 1804. The NCBregistrar 1804 may then call the BI 1802 APIs to trigger work items tobe scheduled.

An application may provide the NCB with a hint that the intervalprovided was too long. This may be used along with the application IDand the notification channel ID to store in a cache again on a pernetwork basis using the NLM cache library 1812 described previously.

A model for identifying notification channels may be based on a“Start/Done” model which delineates a process-wide time span duringwhich each established TCP connection by a process (except loopback) istreated as a notification channel by NCB. A Start/Done time span,however, has a single set of parameters, collectively referred as one“NCContext”, which apply to each of the connections created during thatspan. It should be noted that a one-to-one relationship between anNCContext and a TCP connection is typically encountered. However, theStart/Done model does not guarantee this relationship, hence this designmay operate under an assumption that there can be multiple TCPconnections that correspond to a single NCContext span. This span may beidentified by a tuple that includes a process ID, an opaque NCContext IDcreated and used by the registrar, an optional opaque notificationchannel ID (passed to BI during event signaling, hence meaningful to theapp), and an optional remote-wake brokered event.

The NCB registrar 1804 may be configured to indicate the Start(PID,NCContextID, AppNCID, BrokeredEvent) and Done( ) (e.g., setting andclearing an NCContext) to WPM. The NCB registrar 1804 may also ensurethat the actual application process PID remains intact (e.g., is notrecycled) during the Start/Done time span. The NCB registrar 1804 mayachieve this by using an RPC API that takes a reference on the clientprocess.

The NCB may indicate the Start and Done to WPM 1808 via NSI 1814. WPMmay expose a NET NSI object (which may be similar to a port reservationNSI object) for this purpose. NCB may use NSI set commands for settingthe active NCContext (e.g., Start) and clearing the active NCContext(e.g., Done). In one or more implementations, there is a single activeNCContext for a given process at a given point in time.

TCP connections established by a given process may inherit the currentactive NCContext (if any) for that process. Once an NCContext isinherited, it may remain attached to the inheriting TCP connection. Ifthe NCB sets a new active NCContext for a process (e.g., after clearingthe previous active one), new connections may inherit the new NCContext,and connections that have inherited the previous NCContext may remainunaffected. An inherited NCContext (by one or more TCP connections) maybe cleared by the NCB service 1806 by also using NSI 1814. If anNCContext is cleared, WPM 1808 may stop signaling the associatedremote-wake brokered event (but the plumbed wake pattern remains intactuntil the connection is closed).

Since WPM 1808 may keep track of some per process state (e.g., activeand inherited NCContexts) that is controlled by the NCB service 1806, itmay rely on the NCB service 1806 to properly cleanup state (NCContexts)as applications exit. However, it is possible that the NCB service 1806process may crash/exit abnormally. In order to perform proper cleanup,WPM 1808 may receive an indication of NCB service process exit by NCBcreating a TCP socket (not bound or connected) and setting a privateoption on the socket to mark it as the NCB control socket. Since theobject manager properly closes handles (which includes sockets) when aprocess exits, the socket handle closure causes TCP's endpoint closeroutine to be invoked. TCP may then cleanup each of the NCContexts uponclosure of the NCB control socket.

As described previously, the wake pattern manager (WPM) 1808 (which maybe implemented in a TCP module in tcpip.sys) may be configured to keeptrack of NCContexts. TCP may keep a table of processes and theassociated NCContext(s) set by the NCB service 1806. In one or moreimplementations, there is either one or zero “active” NCContext for agiven process and there can be one or more “inherited” NCContexts for agiven process. TCP may be configured to allow a single system accountunder which NCB service runs to set/clear NCContexts.

In one or more implementations, an NCContext has one reference count forbeing “active” and one reference count for each inheriting connection.That is, the NCContext can be deleted when it is neither active nor wasinherited by connections.

When a connection inherits an NCContext, WPM 1808 may plumb down a wakepattern made up from a connection's 4-tuple down to the networkinterface device via NSI 1814 methods for wake-pattern plumbing if theNIC supports wake patterns. WPM 1808 may keep track of whether a wakepattern was not successfully plumbed for a given connection for eachactive NCContext. Before the active NCContext is cleared by the NCBservice during the “Done” call, NCB service 1806 may issue an NSI getfor that NCContext to query this wake pattern plumbing status and returnthe information to the application (e.g., whether the system failed toplumb a wake pattern for a connection associated with that NCContext).

For each TCP connection which has inherited an NCContext with a brokeredremote-wake event, TCP may signal the brokered remote-wake eventwhenever a data indication (e.g., upcall or receive completion) is madeby TCP on that connection due to incoming data. Once TCP signals theremote wake event, it may disable (e.g., disarm) further signaling onthat NCContext until the remote-wake event is rearmed by the NCB service1806. NCB service 1806 rearms the remote wake-event after theapplication's remote-wake callback returns control back to the NCBroutine which invoked the callback.

SIO_ADDRESS_LIST_SORT ioctl handling in NL may also be changed to beaware of whether the Ioctl is being issued by a process while there isan active NCContext for that process, and if yes, the sort logic mayprefer the addresses over native interfaces to tunnel interfaces.

WPM 1808 may also keep a timer for tracking the remaining validlifetimes for IPv6 addresses formed by using an IPv6 subnet prefixadvertised by a router. Since router advertisements may be dropped bythe NICs in a wake-able low-power state, the IPv6 prefix timeout may berefreshed via explicit router solicitation before the timeout happens,otherwise L3 identity may not be preserved reliably in some instances.The WPM 1808 may use the NDIS API to take a “NIC active reference” onthe network interface on which router solicitation may take place inorder to ensure that the NIC “stays up” (e.g., does not go into D3 dueto not having any NIC-active reference held by anyone in the system).

Example System and Device

FIG. 19 illustrates an example system 1900 that includes the computingdevice 102 as described with reference to FIG. 1. The example system1900 enables ubiquitous environments for a seamless user experience whenrunning applications on a personal computer (PC), a television device,and/or a mobile device. Services and applications run substantiallysimilar in all three environments for a common user experience whentransitioning from one device to the next while utilizing anapplication, playing a video game, watching a video, and so on.

In the example system 1900, multiple devices are interconnected througha central computing device. The central computing device may be local tothe multiple devices or may be located remotely from the multipledevices. In one embodiment, the central computing device may be a cloudof one or more server computers that are connected to the multipledevices through a network, the Internet, or other data communicationlink. In one embodiment, this interconnection architecture enablesfunctionality to be delivered across multiple devices to provide acommon and seamless experience to a user of the multiple devices. Eachof the multiple devices may have different physical requirements andcapabilities, and the central computing device uses a platform to enablethe delivery of an experience to the device that is both tailored to thedevice and yet common to all devices. In one embodiment, a class oftarget devices is created and experiences are tailored to the genericclass of devices. A class of devices may be defined by physicalfeatures, types of usage, or other common characteristics of thedevices.

In various implementations, the computing device 102 may assume avariety of different configurations, such as for computer 1902, mobile1904, and television 1906 uses. Each of these configurations includesdevices that may have generally different constructs and capabilities,and thus the computing device 102 may be configured according to one ormore of the different device classes. For instance, the computing device102 may be implemented as the computer 1902 class of a device thatincludes a personal computer, desktop computer, a multi-screen computer,laptop computer, netbook, and so on.

The computing device 102 may also be implemented as the mobile 1904class of device that includes mobile devices, such as a mobile phone,portable music player, portable gaming device, a tablet computer, amulti-screen computer, and so on. The computing device 102 may also beimplemented as the television 1906 class of device that includes deviceshaving or connected to generally larger screens in casual viewingenvironments. These devices include televisions, set-top boxes, gamingconsoles, and so on. The techniques described herein may be supported bythese various configurations of the computing device 102 and are notlimited to the specific examples the techniques described herein. Thisis illustrated through use inclusion of the network broker module 122,wake pattern manager module 124, network device manager module 126, andkeep alive manager module 128 on the computing device 102. All or partof this functionality may also be distributed “over the cloud” asdescribed below.

The cloud 1908 includes and/or is representative of a platform 1910 forcontent services 1912. The platform 1910 abstracts underlyingfunctionality of hardware (e.g., servers) and software resources of thecloud 1908. The content services 1912 may include applications and/ordata that can be utilized while computer processing is executed onservers that are remote from the computing device 102. Content services1912 can be provided as a service over the Internet and/or through asubscriber network, such as a cellular or Wi-Fi network.

The platform 1910 may abstract resources and functions to connect thecomputing device 102 with other computing devices. The platform 1910 mayalso serve to abstract scaling of resources to provide a correspondinglevel of scale to encountered demand for the content services 1912 thatare implemented via the platform 1910. Accordingly, in an interconnecteddevice embodiment, implementation of functionality of the functionalitydescribed herein may be distributed throughout the system 1900. Forexample, the functionality may be implemented in part on the computingdevice 102 as well as via the platform 1910 that abstracts thefunctionality of the cloud 1908.

FIG. 20 illustrates various components of an example device 2000 thatcan be implemented as any type of computing device as described withreference to FIGS. 1 and 19 to implement embodiments of the techniquesdescribed herein. Device 2000 includes communication devices 2002 thatenable wired and/or wireless communication of device data 2004 (e.g.,received data, data that is being received, data scheduled forbroadcast, data packets of the data, etc.). The device data 2004 orother device content can include configuration settings of the device,media content stored on the device, and/or information associated with auser of the device. Media content stored on device 2000 can include anytype of audio, video, and/or image data. Device 2000 includes one ormore data inputs 2006 via which any type of data, media content, and/orinputs can be received, such as user-selectable inputs, messages, music,television media content, recorded video content, and any other type ofaudio, video, and/or image data received from any content and/or datasource.

Device 2000 also includes communication interfaces 2008 that can beimplemented as any one or more of a serial and/or parallel interface, awireless interface, any type of network interface, a modem, and as anyother type of communication interface. The communication interfaces 2008provide a connection and/or communication links between device 2000 anda communication network by which other electronic, computing, andcommunication devices communicate data with device 2000.

Device 2000 includes one or more processors 2010 (e.g., any ofmicroprocessors, controllers, and the like) which process variouscomputer-executable instructions to control the operation of device 2000and to implement embodiments of the techniques described herein.Alternatively or in addition, device 2000 can be implemented with anyone or combination of hardware, firmware, or fixed logic circuitry thatis implemented in connection with processing and control circuits whichare generally identified at 2012. Although not shown, device 2000 caninclude a system bus or data transfer system that couples the variouscomponents within the device. A system bus can include any one orcombination of different bus structures, such as a memory bus or memorycontroller, a peripheral bus, a universal serial bus, and/or a processoror local bus that utilizes any of a variety of bus architectures.

Device 2000 also includes computer-readable media 2014, such as one ormore memory components, examples of which include random access memory(RAM), non-volatile memory (e.g., any one or more of a read-only memory(ROM), flash memory, EPROM, EEPROM, etc.), and a disk storage device. Adisk storage device may be implemented as any type of magnetic oroptical storage device, such as a hard disk drive, a recordable and/orrewriteable compact disc (CD), any type of a digital versatile disc(DVD), and the like. Device 2000 can also include a mass storage mediadevice 2016.

Computer-readable media 2014 provides data storage mechanisms to storethe device data 2004, as well as various device applications 2018 andany other types of information and/or data related to operationalaspects of device 2000. For example, an operating system 2020 can bemaintained as a computer application with the computer-readable media2014 and executed on processors 2010. The device applications 2018 caninclude a device manager (e.g., a control application, softwareapplication, signal processing and control module, code that is nativeto a particular device, a hardware abstraction layer for a particulardevice, etc.). The device applications 2018 also include any systemcomponents or modules to implement embodiments of the techniquesdescribed herein. In this example, the device applications 2018 includean interface application 2022 and an input/output module 2024 that areshown as software modules and/or computer applications. The input/outputmodule 2024 is representative of software that is used to provide aninterface with a device configured to capture inputs, such as atouchscreen, track pad, camera, microphone, and so on. Alternatively orin addition, the interface application 2022 and the input/output module2024 can be implemented as hardware, software, firmware, or anycombination thereof. Additionally, the input/output module 2024 may beconfigured to support multiple input devices, such as separate devicesto capture visual and audio inputs, respectively.

Device 2000 also includes an audio and/or video input-output system 2026that provides audio data to an audio system 2028 and/or provides videodata to a display system 2030. The audio system 2028 and/or the displaysystem 2030 can include any devices that process, display, and/orotherwise render audio, video, and image data. Video signals and audiosignals can be communicated from device 2000 to an audio device and/orto a display device via an RF (radio frequency) link, S-video link,composite video link, component video link, DVI (digital videointerface), analog audio connection, or other similar communicationlink. In an embodiment, the audio system 2028 and/or the display system2030 are implemented as external components to device 2000.Alternatively, the audio system 2028 and/or the display system 2030 areimplemented as integrated components of example device 2000.

CONCLUSION

Although the invention has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the invention defined in the appended claims is not necessarilylimited to the specific features or acts described. Rather, the specificfeatures and acts are disclosed as example forms of implementing theclaimed invention.

What is claimed is:
 1. A method implemented by a computing device, themethod comprising: monitoring network traffic between the computingdevice and a network; identifying a traffic pattern in the networktraffic as corresponding to an application of the computing device thatis in a suspended state; and responsive to identifying the trafficpattern, waking at least a portion of the corresponding application fromthe suspended state.
 2. A method as described in claim 1, theidentifying the traffic pattern comprising identifying one or more ofpackets, callbacks, or remote endpoints corresponding to the networktraffic.
 3. A method as described in claim 1, further comprisingregistering a traffic pattern as corresponding to an application uponinstallation of the application at the computing device.
 4. A method asdescribed in claim 1, further comprising transitioning an application ofthe computing device from an active state to a suspended state whenfocus is moved away from the application.
 5. A method as described inclaim 1, the waking at least a portion of the corresponding applicationfrom the suspended state comprising transitioning network functionalityof the corresponding application to an active state.
 6. A methodimplemented by a computing device, the method comprising: monitoringnetwork traffic between the computing device and a network;transitioning the computing device from a high power mode to a low powermode; maintaining connectivity between the computing device and thenetwork while the computing device is in the low power mode; receiving apre-registered notification; and responsive to receiving thepre-registered notification, transitioning the computing device from thelow power mode to the high power mode.
 7. A method as described in claim6, the transitioning the computing device from a high power mode to alow power mode comprising disabling outbound network transmissionfunctionality of the computing device.
 8. A method as described in claim6, the computing device configured to enable transmission and receipt ofdata when the computing device is in the high power mode.
 9. A method asdescribed in claim 6, further comprising blocking communication ofpackets from one or more applications of the computing device while thecomputing device is in the low power mode.
 10. A method as described inclaim 6, the transitioning the computing device from the high power modeto the low power mode performed responsive to determining that networktraffic corresponding to one or more applications of the computingdevice has completed.
 11. A method as described in claim 6, furthercomprising maintaining the computing device in the low power mode for aperiod of time, the period of time being specified by a user of thecomputing device.
 12. A method as described in claim 6, the computingdevice comprising a mobile communication device including a Wi-Finetwork interface and a cellular network interface.
 13. A method asdescribed in claim 12, further comprising: determining that the Wi-Finetwork interface is in a high power mode; and transitioning thecellular network interface to a low power mode responsive to determiningthat the Wi-Fi network interface is in a high power mode.
 14. A methodas described in claim 6, the maintaining connectivity between thecomputing device and the network while the computing device is in thelow power mode comprising periodically waking the computing device fromthe low power mode at intervals to communicate with the network.
 15. Amethod as described in claim 6, the pre-registered notificationcomprising one or more of an indication that a particular endpointoriginated the notification or an indication of a four tuple patterndetected in the network traffic.
 16. A device comprising: one or moremodules implemented at least partially in hardware, the one or moremodules configured to perform operations comprising: calculating a keepalive interval for the device; adjusting the keep alive interval basedon monitored usage of the keep alive interval; and using the keep aliveinterval to maintain one or more notification channels between one ormore applications of the device and a network.
 17. A device as describedin claim 16, the calculating the keep alive interval comprisingcalculating the keep alive interval based on a network timeout intervalof one or more intermediary devices of the network.
 18. A device asdescribed in claim 16, the calculating the keep alive intervalcomprising calculating the keep alive interval based on a server timeoutinterval of an endpoint with which the one or more applications of thedevice communicate via the network.
 19. A device as described in claim18, further comprising discovering the server timeout interval frominvestigating the one or more applications of the computing device withwhich the endpoint is to communicate.
 20. A device as described in claim16, the adjusting the keep alive interval performed responsive to a lossof communication via one or more of the notification channels.